<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button id="btn">加载图片</button>

    <img src="" alt="" data-src="https://gitee.com/static/images/logo-black.svg?t=158106664" />

    <script src="../jquery.min.js"></script>
    <script>
      $(function () {
        $('#btn').on('click', function () {
          $('img').prop('src', $('img').data().src)
        })
      })
    </script>
  </body>
</html>
